# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ruby-cldr-plurals-runtime-rb
_gemname=${pkgname#ruby-}
pkgver=1.1.0
pkgrel=5
pkgdesc='Ruby runtime methods for CLDR plural rules (see camertron/cldr-plurals).'
arch=('any')
url='https://github.com/camertron/cldr-plurals-runtime-rb'
license=('MIT')
depends=('ruby')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
sha512sums=('2113e93c0a3b7a62095a3c7ded87663cbe8994df26cccb7a13633a9daf4bc593ef608f58b3bc00683ea58b5972e00a2f90b11f1781c65831fe0b91d7ceda0f3d')

package() {
  _gemhome="$(gem env home)"

  gem install --ignore-dependencies --no-user-install --no-document \
    -i "$pkgdir/$_gemhome" -n "$pkgdir/usr/bin" "$_gemname-$pkgver.gem"

  rm "$pkgdir/$_gemhome/cache/$_gemname-$pkgver.gem"

  install -Dm 644 "$pkgdir/$_gemhome/gems/$_gemname-$pkgver/LICENSE.txt" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

